<include file="Public:header" />
<script type="text/javascript"> 
$(function(){
    $('#addPart').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success:function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            title : {
                required : true
            },
			 buyers : {
                required : true
            }										
        },
        messages : {
            title : {
                required : '标题不能为空'
            },
			buyers : {
                required : '不能为空'
            }			
        }	
    });
});
</script>
<style>
body{font-size:12px;}
.sminput{width:30px; text-align:center;}
td a{ margin:0 5px;}
tr{ height:40px;}
.red{ color:#F00}
</style>
<div id="content">
	<div id="main">
    	<div class="pad20">
        	<if condition="$myself neq 1">
                <include file="default:navig" />   
                <div>
                    <p style="text-align:right;"><input onclick="selflo('{$lasturl}')" class="button" type="submit" value="返回上一级" /></p>
                </div>
            </if>
			<div id="tabs">            
                <ul>
               		 <li><a href="#tabs-1">{$tabs}</a></li>
                </ul>               
                
                <div id="tabs-1">
                <form id="addPart" method="post" action="__APP__/Do/{$act}/">
                <input type="hidden" name="model" value="{$model}" />
                <input type="hidden" name="act" value="{$act}" />
                <input type="hidden" name="callback" value="{$callback}" />       
                <input type="hidden" name="id" value="{$res['id']}" />
                <table border="0" cellpadding="0" cellspacing="0"> 
				 <tr>   
                 	<td>标题：</td>
                    <td><input class="w160" name="title" type="text" value="{$res['title']}"/><label class="field_notice w200"><span class="red">*</span>必填</label></td>
                 </tr> 
                 <tr>   
                 	<td>买家：</td>
                    <td><input class="w160" name="buyers" type="text" value="{$res['buyers']}"/><label class="field_notice w200"><span class="red">*</span>必填</label></td>
                 </tr>
                 <tr>   
                 	<td>内容：</td>
                    <td><textarea name="content">{$res['content']}</textarea></td>
                 </tr>                                    	                                
                 <tr>
                 	<td colspan="2"><input class="button" type="submit" value="执行" /></td>
                 </tr>
                 </table>
                 </form>
                </div>                                 
			</div>  
        </div>
	</div>
</div>            
                
<include file="Public:footer" />    